package com.ruoyi.wretchant.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.wretchant.mapper.MetaSharesMapper;
import com.ruoyi.wretchant.domain.MetaShares;
import com.ruoyi.wretchant.service.IMetaSharesService;
import com.ruoyi.common.core.text.Convert;

/**
 * 股票Service业务层处理
 * 
 * @author 简简单单 Online zuozuo
 * @date 2021-08-15
 */
@Service
public class MetaSharesServiceImpl implements IMetaSharesService 
{
    @Autowired
    private MetaSharesMapper metaSharesMapper;

    /**
     * 查询股票
     * 
     * @param id 股票主键
     * @return 股票
     */
    @Override
    public MetaShares selectMetaSharesById(Long id)
    {
        return metaSharesMapper.selectMetaSharesById(id);
    }

    /**
     * 查询股票列表
     * 
     * @param metaShares 股票
     * @return 股票
     */
    @Override
    public List<MetaShares> selectMetaSharesList(MetaShares metaShares)
    {
        return metaSharesMapper.selectMetaSharesList(metaShares);
    }

    /**
     * 新增股票
     * 
     * @param metaShares 股票
     * @return 结果
     */
    @Override
    public int insertMetaShares(MetaShares metaShares)
    {
        return metaSharesMapper.insertMetaShares(metaShares);
    }

    /**
     * 修改股票
     * 
     * @param metaShares 股票
     * @return 结果
     */
    @Override
    public int updateMetaShares(MetaShares metaShares)
    {
        return metaSharesMapper.updateMetaShares(metaShares);
    }

    /**
     * 批量删除股票
     * 
     * @param ids 需要删除的股票主键
     * @return 结果
     */
    @Override
    public int deleteMetaSharesByIds(String ids)
    {
        return metaSharesMapper.deleteMetaSharesByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除股票信息
     * 
     * @param id 股票主键
     * @return 结果
     */
    @Override
    public int deleteMetaSharesById(Long id)
    {
        return metaSharesMapper.deleteMetaSharesById(id);
    }
}
